package com.ruoyi.binance.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.binance.domain.BinanceDailyMarket;
import org.apache.ibatis.annotations.Param;

/**
 * 日行情Mapper接口
 * 
 * @author zq
 * @date 2025-09-10
 */
public interface BinanceDailyMarketMapper 
{
    /**
     * 查询日行情
     * 
     * @param code 日行情主键
     * @return 日行情
     */
    public BinanceDailyMarket selectBinanceDailyMarketByCodeAndDate(@Param("code")String code, @Param("date")String date);

    /**
     * 查询日行情列表
     * 
     * @param binanceDailyMarket 日行情
     * @return 日行情集合
     */
    public List<BinanceDailyMarket> selectBinanceDailyMarketList(BinanceDailyMarket binanceDailyMarket);

    /**
     * 新增日行情
     * 
     * @param binanceDailyMarket 日行情
     * @return 结果
     */
    public int insertBinanceDailyMarket(BinanceDailyMarket binanceDailyMarket);

    /**
     * 修改日行情
     * 
     * @param binanceDailyMarket 日行情
     * @return 结果
     */
    public int updateBinanceDailyMarket(BinanceDailyMarket binanceDailyMarket);

    /**
     * 删除日行情
     * 
     * @param code 日行情主键
     * @return 结果
     */
    public int deleteBinanceDailyMarketByCode(String code);

    /**
     * 批量删除日行情
     * 
     * @param codes 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBinanceDailyMarketByCodes(String[] codes);

    public BigDecimal selectBinanceDailyMarketAveHigh(@Param("code") String code, @Param("date") String date);

    public BigDecimal selectBinanceDailyMarketAveLow(@Param("code") String code, @Param("date") String date);

    public BigDecimal selectBinanceDailyMarketAveWeightedAvgPrice(@Param("code") String code, @Param("date") String date);
}
